program intersection;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  i, n, k, j: integer;
  y, x: array of integer;
  fin: textFile;

begin
  assignFile(fin, 'input.txt');
  reset(fin);
  readln(fin, n);
  setlength(x, 2*n);
  setlength(y, 2*n);
  j:=0;
  for i:=0 to (4*n)-1 do
  begin
    if ((i mod 2)=0) then
    begin
      read(fin, x[j]);
      j:=j+1;
    end
    else
      read(fin, y[j-1]);
  end;
  if (n<>1) then
  begin
    k:=round((n*(n-1))/2);
    for i:=0 to 2*n-1 do
    begin
      for j:=i+1 to 2*n-3 do
      begin
        if (y[i]-y[i+1]=y[j+1]-y[j+2]) and (x[i+1]-x[i]=x[j+2]-x[j+1]) then
          k:=k-1;
      end;
    end;
  end
  else
    k:=1;
  write(k);
  readln;
end.
 